<?
    $username = $_POST['username'];
    $pwd = $_POST['pwd'];
    $fileLen = $_POST['fileLen'] ; 
    if(!file_exists("./uploads")){
        mkdir("./uploads");
    }
    $now = time();
    
    for( $i = 0 ; $i < $fileLen ; $i ++ ){
        move_uploaded_file($_FILES['item'.$i]['tmp_name'],"./uploads/".$now.$i.".jpg");
        $newArr [] = $now.$i.".jpg" ; 
    }
    $str = join($newArr,",");
    $arr = [] ;
    $arr['username'] = $username ; 
    $arr['pwd'] = $pwd ; 
    echo $str;
?>